import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from '../src/router/router.js'
import { createPinia } from 'pinia'
const pinia = createPinia()
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'view-ui-plus/dist/styles/viewuiplus.css'
import axios from 'axios'
import * as echarts from 'echarts'

import Particles from 'particles.vue3';
import piniaPluginPersist from 'pinia-plugin-persist';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
axios.defaults.baseURL = 'http://localhost:9000'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
pinia.use(piniaPluginPersist);
app.config.globalProperties.$echarts = echarts
app.use(router)
app.use(pinia)
app.use(Particles)
app.use(ElementPlus)
app.mount('#app')
